package com.bocloud.cmp.entity.resource;

import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.bocloud.common.utils.DateSerializer;
import com.bocloud.entity.annotations.Column;
import com.bocloud.entity.annotations.IgnoreAll;
import com.bocloud.entity.annotations.PK;
import com.bocloud.entity.annotations.Table;
import com.bocloud.entity.bean.GenericEntity;
import com.bocloud.entity.meta.PKStrategy;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

/**
 * 网络设备类
 * 
 * @author wei wei
 * @version 1.0
 * @since 2016.12.06
 */
@Table("network_device")
public class NetworkDevice extends GenericEntity {

	@PK(value = PKStrategy.AUTO)
	private Long id; // ID
	@Column("type")
	private String type; // 目标类型
	@Column("version")
	private String version; // 型号
	@Column("serial")
	private String serial; // 序列号
	@Column("location")
	private String location; // 物理位置
	@Column("device_name")
	private String deviceName; // 设备名称
	@Column("asset_tag")
	private String assetTag; // 资产编号
	@Column("befrom")
	private String befrom; // 来源
	@Column("maker")
	private String maker; // 制造商
	@Column("contract_no")
	private String contractNo; // 服务合同号
	@Column("service_start")
	@JsonSerialize(using = DateSerializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date serviceStart; // 服务开始时间
	@Column("service_end")
	@JsonSerialize(using = DateSerializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date serviceEnd; // 服务到期时间
	@Column("vendor")
	private String vendor; // 服务提供商
	@Column("vendor_phone")
	private String vendorPhone; // 服务提供商联系方式
	@Column("maker_phone")
	private String makerPhone; // 制造商联系方式
	@Column("hardware")
	private String hardware; // 硬件配置
	@Column("environment")
	private String environment; // 所属环境
	@Column("service_ip")
	private String serviceIp; // 服务IP地址
	@Column("service_port")
	private String servicePort; // 端口信息
	@Column("account")
	private String account; // 管理账户
	@Column("password")
	private String password; // 管理口令
	@Column("rack_id")
	private Long rackId; // 机柜Id
	@IgnoreAll
	private Long roomId; // 机房ID
	@IgnoreAll
	private String roomname; // 机房名称
	@IgnoreAll
	private Long dcId; // 数据中心ID
	@IgnoreAll
	private String dcname; // 数据中心名称
	@IgnoreAll
	private String rackname; // 机柜名称
	@Column("expired_time")
	@JsonSerialize(using = DateSerializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date expiredTime;// 过期时间
	@Column("start_command")
	private String startCommand;// 启动脚本
	@Column("stop_command")
	private String stopCommand;// 关闭脚本

	/**
	 * @return the startCommand
	 */
	public String getStartCommand() {
		return startCommand;
	}

	/**
	 * @param startCommand
	 *            the startCommand to set
	 */
	public void setStartCommand(String startCommand) {
		this.startCommand = startCommand;
	}

	/**
	 * @return the stopCommand
	 */
	public String getStopCommand() {
		return stopCommand;
	}

	/**
	 * @param stopCommand
	 *            the stopCommand to set
	 */
	public void setStopCommand(String stopCommand) {
		this.stopCommand = stopCommand;
	}

	/**
	 * @return the expiredTime
	 */
	public Date getExpiredTime() {
		return expiredTime;
	}

	/**
	 * @param expiredTime
	 *            the expiredTime to set
	 */
	public void setExpiredTime(Date expiredTime) {
		this.expiredTime = expiredTime;
	}

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the type
	 */
	public String getType() {
		return type;
	}

	/**
	 * @param type
	 *            the type to set
	 */
	public void setType(String type) {
		this.type = type;
	}

	/**
	 * @return the version
	 */
	public String getVersion() {
		return version;
	}

	/**
	 * @param version
	 *            the version to set
	 */
	public void setVersion(String version) {
		this.version = version;
	}

	/**
	 * @return the serial
	 */
	public String getSerial() {
		return serial;
	}

	/**
	 * @param serial
	 *            the serial to set
	 */
	public void setSerial(String serial) {
		this.serial = serial;
	}

	/**
	 * @return the location
	 */
	public String getLocation() {
		return location;
	}

	/**
	 * @param location
	 *            the location to set
	 */
	public void setLocation(String location) {
		this.location = location;
	}

	/**
	 * @return the deviceName
	 */
	public String getDeviceName() {
		return deviceName;
	}

	/**
	 * @param deviceName
	 *            the deviceName to set
	 */
	public void setDeviceName(String deviceName) {
		this.deviceName = deviceName;
	}

	/**
	 * @return the assetTag
	 */
	public String getAssetTag() {
		return assetTag;
	}

	/**
	 * @param assetTag
	 *            the assetTag to set
	 */
	public void setAssetTag(String assetTag) {
		this.assetTag = assetTag;
	}

	/**
	 * @return the befrom
	 */
	public String getBefrom() {
		return befrom;
	}

	/**
	 * @param befrom
	 *            the befrom to set
	 */
	public void setBefrom(String befrom) {
		this.befrom = befrom;
	}

	/**
	 * @return the maker
	 */
	public String getMaker() {
		return maker;
	}

	/**
	 * @param maker
	 *            the maker to set
	 */
	public void setMaker(String maker) {
		this.maker = maker;
	}

	/**
	 * @return the contractNo
	 */
	public String getContractNo() {
		return contractNo;
	}

	/**
	 * @param contractNo
	 *            the contractNo to set
	 */
	public void setContractNo(String contractNo) {
		this.contractNo = contractNo;
	}

	/**
	 * @return the serviceStart
	 */
	public Date getServiceStart() {
		return serviceStart;
	}

	/**
	 * @param serviceStart
	 *            the serviceStart to set
	 */
	public void setServiceStart(Date serviceStart) {
		this.serviceStart = serviceStart;
	}

	/**
	 * @return the serviceEnd
	 */
	public Date getServiceEnd() {
		return serviceEnd;
	}

	/**
	 * @param serviceEnd
	 *            the serviceEnd to set
	 */
	public void setServiceEnd(Date serviceEnd) {
		this.serviceEnd = serviceEnd;
	}

	/**
	 * @return the vendor
	 */
	public String getVendor() {
		return vendor;
	}

	/**
	 * @param vendor
	 *            the vendor to set
	 */
	public void setVendor(String vendor) {
		this.vendor = vendor;
	}

	/**
	 * @return the vendorPhone
	 */
	public String getVendorPhone() {
		return vendorPhone;
	}

	/**
	 * @param vendorPhone
	 *            the vendorPhone to set
	 */
	public void setVendorPhone(String vendorPhone) {
		this.vendorPhone = vendorPhone;
	}

	/**
	 * @return the makerPhone
	 */
	public String getMakerPhone() {
		return makerPhone;
	}

	/**
	 * @param makerPhone
	 *            the makerPhone to set
	 */
	public void setMakerPhone(String makerPhone) {
		this.makerPhone = makerPhone;
	}

	/**
	 * @return the hardware
	 */
	public String getHardware() {
		return hardware;
	}

	/**
	 * @param hardware
	 *            the hardware to set
	 */
	public void setHardware(String hardware) {
		this.hardware = hardware;
	}

	/**
	 * @return the environment
	 */
	public String getEnvironment() {
		return environment;
	}

	/**
	 * @param environment
	 *            the environment to set
	 */
	public void setEnvironment(String environment) {
		this.environment = environment;
	}

	/**
	 * @return the serviceIp
	 */
	public String getServiceIp() {
		return serviceIp;
	}

	/**
	 * @param serviceIp
	 *            the serviceIp to set
	 */
	public void setServiceIp(String serviceIp) {
		this.serviceIp = serviceIp;
	}

	/**
	 * @return the servicePort
	 */
	public String getServicePort() {
		return servicePort;
	}

	/**
	 * @param servicePort
	 *            the servicePort to set
	 */
	public void setServicePort(String servicePort) {
		this.servicePort = servicePort;
	}

	/**
	 * @return the account
	 */
	public String getAccount() {
		return account;
	}

	/**
	 * @param account
	 *            the account to set
	 */
	public void setAccount(String account) {
		this.account = account;
	}

	/**
	 * @return the password
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * @param password
	 *            the password to set
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	/**
	 * @return the rackId
	 */
	public Long getRackId() {
		return rackId;
	}

	/**
	 * @param rackId
	 *            the rackId to set
	 */
	public void setRackId(Long rackId) {
		this.rackId = rackId;
	}

	/**
	 * @return the roomId
	 */
	public Long getRoomId() {
		return roomId;
	}

	/**
	 * @param roomId
	 *            the roomId to set
	 */
	public void setRoomId(Long roomId) {
		this.roomId = roomId;
	}

	/**
	 * @return the roomname
	 */
	public String getRoomname() {
		return roomname;
	}

	/**
	 * @param roomname
	 *            the roomname to set
	 */
	public void setRoomname(String roomname) {
		this.roomname = roomname;
	}

	/**
	 * @return the dcId
	 */
	public Long getDcId() {
		return dcId;
	}

	/**
	 * @param dcId
	 *            the dcId to set
	 */
	public void setDcId(Long dcId) {
		this.dcId = dcId;
	}

	/**
	 * @return the dcname
	 */
	public String getDcname() {
		return dcname;
	}

	/**
	 * @param dcname
	 *            the dcname to set
	 */
	public void setDcname(String dcname) {
		this.dcname = dcname;
	}

	/**
	 * @return the rackname
	 */
	public String getRackname() {
		return rackname;
	}

	/**
	 * @param rackname
	 *            the rackname to set
	 */
	public void setRackname(String rackname) {
		this.rackname = rackname;
	}

}